package com.darkevil.descan.util

import java.io.BufferedReader
import java.io.InputStreamReader

/**
 * Created by DaRKeViL on 2017/7/21.
 */
class CMDUtil {
    //静态方法要用companion object扩起来
    companion object{
        fun runcmd(cmd: String): String {
            val process = Runtime.getRuntime().exec(cmd)
            val bufferedReader = BufferedReader(InputStreamReader(process.inputStream,"gbk"))
            return bufferedReader.readText()
        }
    }
   
}